function up(x,y){//升序
        return x[val.prop] - y[val.prop]
  }
  function down(x,y){//降序
        return y[val.prop] - x[val.prop]
  }

arr.sort(up)
arr.sort(down)


zhangguo
6 声望0 粉丝

keep coding